package cn.edu.zut.model;

import org.springframework.stereotype.Component;
import org.springframework.context.annotation.Scope;
import javax.annotation.Resource;
import java.util.List;

@Component
@Scope("prototype")
public class Student {
    private String Sno;
    private String Sname;
    private String Ssex;
    private int Sage;
    private String Sdept;
    private String Sphones;
    private List<Course> courses;

    public String getSno() {
        return Sno;
    }

    public void setSno(String sno) {
        this.Sno = sno;
    }

    public String getSname() {
        return Sname;
    }

    public void setSname(String sname) {
        this.Sname = sname;
    }

    public int getSage() {
        return Sage;
    }

    public void setSage(int sage) {
        this.Sage = sage;
    }

    public String getSdept() {
        return Sdept;
    }

    public void setSdept(String sdept) {
        this.Sdept = sdept;
    }

    public String getSsex() {
        return Ssex;
    }

    public void setSsex(String ssex) {
        this.Ssex = ssex;
    }

    public String getSphones() {
        return Sphones;
    }

    public void setSphones(String sphones) {
        this.Sphones = sphones;
    }

    public List<Course> getCourses() {
        return courses;
    }

    @Resource(name = "list")
    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }

    @Override
    public String toString() {
        return "Student{" +
                "Sno='" + Sno + '\'' +
                ", Sname='" + Sname + '\'' +
                ", Ssex='" + Ssex + '\'' +
                ", Sage=" + Sage +
                ", Sdept='" + Sdept + '\'' +
                ", Sphones=" + Sphones +
                ", courses=" + courses +
                '}';
    }
}
